﻿using System;
using System.Collections.Generic;
using System.Web.UI;
using SouthernLand.Common;
using SouthernLand.Common.BOL.Articles;

namespace SouthernLand.Controls
{
    public partial class MenuTop : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        private string GetArticleTitle(int CateID)
        {
            string strTitle = "";

            if (CateID > 0)
            {
                // kiem tra xem can hien thi san pham hinh thuc nao
                List<ArticleCategory> obj = ArticleCategory.GetArticleCategoryByParentID(CateID);
                // xem loai cha
                if (obj.Count > 0)
                {
                    strTitle = ArticleCategory.GetCateNameByCateID(CateID);
                }
                else
                {
                    ArticleCategory cate = ArticleCategory.GetArticleCategoryByID(CateID);
                    strTitle = ArticleCategory.GetCateNameByCateID(cate.ParentID) + " <img src=" + Globals.ImagesUrl() +
                               "li1.gif align='absmiddle'> " + ArticleCategory.GetCateNameByCateID(CateID);
                }
            }
            else
            {
                strTitle = Globals.GetLang("Tin tức", "News");
            }
            return strTitle;
        }

        protected void btSearch_Click(object sender, ImageClickEventArgs e)
        {
            
        }
    }
}